package vampirism.core.shared;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle;

public class Message {
	
	public BitmapFont font;
	public LabelStyle style;
	public String text;
	
	public Rectangle pos;
	
	public int timer = 1000;//Time before the message disappears
	
	public Message(Rectangle pos, String labelText){
		this.createMessage(pos,labelText,Color.WHITE,2000);
	}
	
	public Message(Rectangle pos, String labelText, int lifeTime){
		this.createMessage(pos,labelText,Color.WHITE,lifeTime);
	}
	
	public Message(Rectangle pos, String labelText, Color color){
		this.createMessage(pos,labelText,color,2000);
	}
	
	public Message(Rectangle pos, String labelText, Color color, int lifeTime){
		this.createMessage(pos,labelText,color,lifeTime);
	}

	private void createMessage(Rectangle pos, String labelText, Color color, int lifeTime) {
		
		this.pos = pos;
		this.text = labelText;
		this.timer = lifeTime;
		
		font = new BitmapFont();
		style = new LabelStyle();
		style.font = font;
		style.fontColor = color;

	}
}